#region Copyright RenGuiYou. All rights reserved.
//=====================================================
// NeatlyFrameWork
// Author:      RenGuiyou
// Feedback: 	mailto:750539605@qq.com
//=====================================================
#endregion
using System.IO;
using PandoraEditor;
using UnityEditor;
using UnityEngine;

namespace NeatlyEditor
{
    public static class NeatlyEditorConfig
    {
        public const string NAME_TEMP = "temp~";
        public const string NAME_EXPORT_BUNDLE = "export_bundle";
        public const string PATH_SCENE_OFFICIAL = "assets/scene/official";
        public static readonly string PATH_PROJECT = Path.GetDirectoryName(Application.dataPath);
        public static string PATH_EXPORT_BUNDLE => Path.Combine(PdrCombine.ProjectRoot(NAME_EXPORT_BUNDLE), NeatlyConfig.NAME_SYSTEM_PLATFORM);
        public static readonly string PATH_LUA = Path.Combine(Application.dataPath, "lua");
        public static readonly string PATH_TOLUA = Path.Combine(Application.dataPath, "tolua/lua");
        public static string PATH_TEMP => Path.Combine(Application.dataPath, NAME_TEMP, NeatlyConfig.NAME_SYSTEM_PLATFORM);
#if UNITY_WEBGL
        public static readonly string PATH_TEMP_LUA32 = Path.Combine(Application.dataPath, NeatlyConfig.LUA_PACKAGE_32);
        public static readonly string PATH_TEMP_LUA64 = Path.Combine(Application.dataPath, NeatlyConfig.LUA_PACKAGE_64);
#else
        public static readonly string PATH_TEMP_LUA32 = Path.Combine(PATH_TEMP, NeatlyConfig.LUA_PACKAGE_32);
        public static readonly string PATH_TEMP_LUA64 = Path.Combine(PATH_TEMP, NeatlyConfig.LUA_PACKAGE_64);
#endif
        public static readonly string PATH_TEMP_BUNDLE = Path.Combine(PATH_TEMP, NeatlyConfig.BUNDLE_PACKAGE);
        public static readonly string PATH_ANDROID = PdrCombine.ProjectRoot($"native/Android");
        public static readonly string PATH_IOS = PdrCombine.ProjectRoot($"native/iOS");
        public static readonly string PATH_WEBGL = PdrCombine.ProjectRoot($"native/WebGL");
        public static readonly string PATH_WIN64 = PdrCombine.ProjectRoot($"native/Win64");
        public static readonly string PATH_ANDROID_TEMP_PROJECT = Path.Combine(PATH_ANDROID, "AndroidProjectTemp/NeatlyClient");
        public static readonly string PATH_ANDROID_PROJECT = Path.Combine(PATH_ANDROID, "AndroidProject/NeatlyClient");
        public static readonly string PATH_ANDROID_OUTPUTS = $"{PATH_ANDROID_PROJECT}/launcher/build/outputs/";
        public static readonly string PATH_IOS_PROJECT = Path.Combine(PATH_IOS, "NeatlyClient");
        
        
        public const string SUFFIX_ASSET = ".asset";
#if UNITY_IPHONE
        public static readonly BuildTarget BUILD_TARGET = BuildTarget.iOS;
#elif UNITY_ANDROID
        public static readonly BuildTarget BUILD_TARGET = BuildTarget.Android;
#elif UNITY_WEBGL
        public static readonly BuildTarget BUILD_TARGET = BuildTarget.WebGL;
#else
        public static readonly BuildTarget BUILD_TARGET = BuildTarget.StandaloneWindows64;
#endif
    }
}